package main

import (
	"fmt"

	"github.com/gin-gonic/gin"
)

func main() {
	gin.SetMode(gin.ReleaseMode)
	server := BuildRouter()

	//设置主页
	server.LoadHTMLGlob(GlobalConfig.Home_page)
	// 设置静态文件
	for key, value := range GlobalConfig.Static.Dir {
		server.Static(key, value)
	}
	for key, value := range GlobalConfig.Static.File {
		server.StaticFile(key, value)

	}

	// 启动！
	fmt.Println("server on", GlobalConfig.Addr)
	server.Run(GlobalConfig.Addr)
}
